/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.own.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 田间管理信息Entity
 * @author F
 * @version 2019-09-27
 */
@Table(name="own_medicine_field_management", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一ID", isPK=true),
		@Column(name="own_medicine_plant_information_id", attrName="ownMedicinePlantInformationId", label="种植信息ID", isQuery=false),
		@Column(name="batch_id", attrName="batchId", label="种植批次号"),
		@Column(name="name", attrName="name", label="管理名称", queryType=QueryType.LIKE),
		@Column(name="type", attrName="type", label="管理类型"),
		@Column(name="weight", attrName="weight", label="用量", comment="用量(kg)"),
		@Column(name="specific_type", attrName="specificType", label="具体种类", comment="具体种类"),
		@Column(name="specific_name", attrName="specificName", label="种类名称", comment="种类名称"),
		@Column(name="add_time", attrName="addTime", label="操作时间"),
		@Column(name="remark", attrName="remark", label="备注"),
		@Column(name="bm_batch_code", attrName="bmBatchCode", label="种植批次码"),
		@Column(name="create_company", attrName="createCompany", label="所属企业标识", isUpdate=false, isQuery=false),
		@Column(name ="uuid", attrName ="uuid",label = "操作标识符"),
		@Column(name="txid", attrName ="txid",label = "返回的txid"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class OwnMedicineFieldManagement extends DataEntity<OwnMedicineFieldManagement> {
	
	private static final long serialVersionUID = 1L;
	private String ownMedicinePlantInformationId;		// 种植信息ID
	private String batchId;		// 种植批次号
	private String name;		// 管理名称
	private String type;		// 管理类型
	private String specificType; //具体类型
	private String specificName; //种类名称
	private Double weight;		// 用量(kg)
	private Date addTime;		// 操作时间
	private String remark;		// 备注
	private String bmBatchCode;		// 种植批次码
	private String createCompany;		// 所属企业标识
	private String uuid;		//索引本次操作的上下文标识
	private String txid;

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getTxid() {
		return txid;
	}

	public void setTxid(String txid) {
		this.txid = txid;
	}

	public OwnMedicineFieldManagement() {
		this(null);
	}

	public OwnMedicineFieldManagement(String id){
		super(id);
	}
	
	@Length(min=0, max=64, message="种植信息ID长度不能超过 64 个字符")
	public String getOwnMedicinePlantInformationId() {
		return ownMedicinePlantInformationId;
	}

	public void setOwnMedicinePlantInformationId(String ownMedicinePlantInformationId) {
		this.ownMedicinePlantInformationId = ownMedicinePlantInformationId;
	}
	
	@NotBlank(message="种植批次号不能为空")
	@Length(min=0, max=25, message="种植批次号长度不能超过 25 个字符")
	public String getBatchId() {
		return batchId;
	}

	public void setBatchId(String batchId) {
		this.batchId = batchId;
	}

	@NotBlank(message="管理名称不能为空")
	@Length(min=0, max=50, message="管理名称长度不能超过 50 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@NotBlank(message="管理类型不能为空")
	@Length(min=0, max=25, message="管理类型长度不能超过 25 个字符")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Length(min=0, max=50, message="具体种类长度不能超过 50 个字符")
	public String getSpecificType() {
		return specificType;
	}

	public void setSpecificType(String specificType) {
		this.specificType = specificType;
	}

	@Length(min=0, max=50, message="种类名称长度不能超过 50 个字符")
	public String getSpecificName() {
		return specificName;
	}

	public void setSpecificName(String specificName) {
		this.specificName = specificName;
	}
	
	public Double getWeight() {
		return weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	@NotNull(message="操作时间不能为空")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}
	
	@Length(min=0, max=10, message="备注长度不能超过 10 个字符")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@NotBlank(message="种植批次码不能为空")
	@Length(min=0, max=50, message="种植批次码长度不能超过 50 个字符")
	public String getBmBatchCode() {
		return bmBatchCode;
	}

	public void setBmBatchCode(String bmBatchCode) {
		this.bmBatchCode = bmBatchCode;
	}
	
	@Length(min=0, max=64, message="所属企业标识长度不能超过 64 个字符")
	public String getCreateCompany() {
		return createCompany;
	}

	public void setCreateCompany(String createCompany) {
		this.createCompany = createCompany;
	}
	
}